#pragma once
#include "HashTable.h"

namespace cl {
	template<class K, class HashFunc = open_hash::DefaultHash<K>>
	class unordered_set {
		struct SetKeyOfT {
			const K& operator()(const K& key) { return key; }
		};
	public:
		typedef typename open_hash::HashTable<K, K, SetKeyOfT, HashFunc>::iterator iterator;
		iterator begin() { return _ht.begin(); }
		iterator end() { return _ht.end(); }
		pair<iterator, bool> insert(const K& key) { return _ht.Insert(key); }
		iterator find(const K& key) { return _ht.Find(key); }
		bool erase(const K& key) { return _ht.Erase(key); }

	private:
		open_hash::HashTable<K, K, SetKeyOfT, HashFunc> _ht;
	};
}